﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Linq;
using System.Xml.Linq;

using System.IO;

namespace AY.Bot
{
	public partial class Form2
	{
		internal Form2()
		{
			InitializeComponent();
		}

		private System.IO.StreamReader strem;
		private void Button1_Click(object sender, System.EventArgs e)
		{
			this.Hide();

			Form1.DefaultInstance.ButtonStart.Enabled = true;
		}

		private void Button2_Click(object sender, System.EventArgs e)
		{

			OpenFileDialog1.Title = "Proxy";
			OpenFileDialog1.DefaultExt = ".txt";
			OpenFileDialog1.Filter = "(*.txt)|*.txt";
			OpenFileDialog1.FilterIndex = 1;
			if (OpenFileDialog1.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
			{
				ListBox1.Items.Clear();
				strem = System.IO.File.OpenText(OpenFileDialog1.FileName);
                string[] lstring = strem.ReadToEnd().Split(Environment.NewLine.ToCharArray());
				ListBox1.Items.AddRange(lstring);
			}
		}
	}
}